import 'package:boss/ui/page/tableManagement/page/areaManagement/widget/area_management_browser.dart';
import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:boss/ui/widget/label_button.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:router/annotation.dart';

import 'page/areaSort/area_sort_page.dart';

@RouterConfig(AreaManagementPage.pageName)
class AreaManagementPage extends StatefulWidget {
  static const pageName = '/areaManagementPage';

  @override
  _AreaManagementPageState createState() => _AreaManagementPageState('区域管理');
}

class _AreaManagementPageState extends BaseState<AreaManagementPage> {
  _AreaManagementPageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CenterTitleAppBar(
        title: '区域管理',
        actions: <Widget>[
          LabelButton(
            title: '排序',
            padding: EdgeInsets.only(left: 8, top: 2, bottom: 2),
            onTap: () {
              Navigator.pushNamed(context, AreaSortPage.pageName);
            },
          ),
        ],
      ),
      body: AreaManagementBrowser(),
    );
  }
}
